package com.ftg.shopping.mulu.controller;

import com.ftg.shopping.mulu.service.muluService;
import com.ftg.shopping.user.entity.sp_userinfo;
import com.ftg.shopping.user.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@Api(description = "登录管理")
@RestController
@RequestMapping("/api/mulu")
public class muluController {

    @Autowired
    muluService muluService;

    @ApiOperation("查看登录数据")
    @GetMapping("/firstmulu")
    public List<Map<String,Object>> firstmulu(int userid){
        return muluService.firstmulu(userid);
    }

    @ApiOperation("查看登录数据")
    @PutMapping("/firstmulu2")
    public List<Map<String,Object>> firstmulu2(int id,int userid){
        return muluService.firstmulu2(id,userid);
    }

}
